<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/resources/css/pintuer.css">
<link rel="stylesheet" href="/resources/css/admin.css">
<script src="/resources/js/jquery.js"></script>
<script src="/resources/js/pintuer.js"></script>
</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="/folder/toAdd"> 添加文件夹</a> </li>
        <li>
          <input type="text" placeholder="请输入搜索关键字" id="keywords" th:value="${folderName}" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="doSearch()" > 搜索</a></li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="10%">编号</th>
        <th>文件夹名</th>
        <th>备注</th>
        <th width="310">操作</th>
      </tr>
      <tr th:each="folder:${folderList}">
          <td th:text="${folder.folderId}"></td>
          <td><font color="#00CC99" th:text="${folder.folderName}">我的回忆</font></td>
          <td th:text="${folder.folderRemark}">和她的那些年</td>
          <td><div class="button-group">
              <a class="button border-main" th:href="@{/folder/toUpdate(folderId=${folder.folderId})}">
                  <span class="icon-edit"></span> 修改</a>
              <a class="button border-red" href="javascript:void(0)" th:onclick="|return del(${folder.folderId})|">
                  <span class="icon-trash-o"></span> 删除</a> </div></td>
        </tr>
    </table>
  </div>
</form>
<script type="text/javascript">

//搜索
function doSearch(){
		window.location.href="/folder/queryFolderList?folderName="+$("#keywords").val();
}

//单个删除
function del(id){
	if(confirm("您确定要删除吗?")){
        window.location.href="/folder/delete?folderId="+id;
	}
}
</script>
</body>
</html>